﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using SilverlightFX.UserInterface;

namespace DiscoveryLogic.UI.Filters
{
    /// <summary>
    /// type ahead
    /// hit enter to start search
    /// </summary>
    public partial class EntitySearcher : UserControl
    {
        public EntitySearcher()
        {
            InitializeComponent();
        }

        private void OnSearchHistoryAutoCompleted(object sender, AutoCompleteCompletedEventArgs e)
        {
            string queryHistory = (string)e.SelectedItem;
            this.txtSearch.Text = queryHistory;
        }

        private void txtSearch_KeyDown(object sender, KeyEventArgs e)
        {
            if(e.Key==Key.Enter)
            {
                //SearchResultQuickAccess.IsEnabled = true;
            }
        }

        private void txtSearch_TextChanged(object sender, TextChangedEventArgs e)
        {

        }

        private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {

        }
    }
}
